<?php
class TopRecruiters extends CWidget
{
	public $postParams=array();
	public $config=array();
	
	public function run()
  	{?>
<div class="job_for_you">
	<h2 class="mod_title helv_black" style="color:#333;">Top<span class="helv_neue_thin"> Recruiters</span></h2>
	
	<div>
			
     <script src="<?php echo ApplicationConfig::app()->params['theme']['jsUrl']?>jsCarousel-2.0.0.js" type="text/javascript"></script>
    <link href="<?php echo ApplicationConfig::app()->params['theme']['cssUrl']?>jsCarousel-2.0.0.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
   
        $(document).ready(function() {

            $('#carouselv1').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: false, itemstodisplay: 3, orientation: 'v' });
            $('#carouselh1').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: false, circular: false, masked: false, itemstodisplay: 5, orientation: 'h' });
            $('#carouselhAuto1').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: true, itemstodisplay: 5, orientation: 'h' });

        });       
        
    </script>

    <div id="contents1">
        <div id="v21">
            <div id="demo-wrapper1"> 
               
                <div id="demo-right1">
                    <div id="hWrapper1">
                        <div id="carouselh1">
                            
                            	<?php 
                            	$topRecruiters = JobApplication::getList("TOP-RECRUITERS", array());
                            	
                            	if ($topRecruiters)
                            	foreach ($topRecruiters as $topRecruiter)
                            	{
                            		$vendor = Vendor::model()->getModel("VENDOR-ID",array('vendorID'=>$topRecruiter->vendorID));
                            		if ($vendor->vendor_logo_thumb){
				            	?>
				            	<div>
				             	<img src="<?php echo ApplicationConfig::getImageUrl("VENDOR-IMAGES-THUMB", array('file_name'=>$vendor->vendor_logo_thumb));?>" height="78px" width="96px"/>
				               <br />
                                <span class="thumbnail-text"><?php //echo $vendor->vendor_name;?></span>
				               </div>
				                <?php 
                            	} 
				                else {?>
				                <div>
				                <img src="<?php echo ApplicationConfig::app()->params['theme']['imageUrl']?>no_preview.jpg" height="78px" width="96px"/>
				                <br />
                                <span class="thumbnail-text"><?php echo $vendor->vendor_name;?></span>
				                </div>
				                <?php }	}			                
				                ?>
                                
                           
                        </div>  
                    </div>
                </div>
            </div>
        </div>
    </div>
		
	</div>
	
</div>	
  	<?php }
}
?> 